Delivery riders operating two-wheelers face a disproportionately high risk of road accidents, yet automatic crash detection remains rare among Indian food and grocery delivery platforms. This paper presents a machine learning pipeline for real-time crash and fall detection using only smartphone accelerometer and gyroscope data, without dedicated hardware. We combine two public sensor datasets — a motorcycle-fall dataset collected via an instrumented motorcycle with staged real falls, and a smartphone-based driver-behavior dataset — into a unified corpus of 21 independent trials and 1,788 sliding-window feature vectors spanning four classes: normal riding, hard braking, pothole impact, and crash/fall. A Random Forest classifier, selected over a comparably-performing XGBoost model for its interpretability, is evaluated using trial-grouped 5-fold cross-validation to prevent leakage from overlapping sliding windows. The model achieves a mean cross-validated accuracy of 65.7% (with high inter-fold variance attributable to limited trial diversity in two minority classes) and, more critically for the target application, a mean recall of 92.3% on the crash/fall class with a false-positive rate of 14.8%. We propose a tiered escalation architecture — an on-device check-in prompt followed by automatic emergency notification — to absorb the false-positive cost while preserving high sensitivity to genuine falls. We report our findings transparently, including data-quality issues discovered during preprocessing and the specific data-scarcity limitations driving evaluation variance, and outline a human-in-the-loop retraining strategy as the direct path to improvement.
Introduction
This paper presents an open, explainable crash and fall detection system specifically designed for two-wheeler delivery riders, who face a high risk of road accidents in India. Studies show that around 50% of gig delivery riders have experienced a crash, while 75% have encountered near-miss incidents. Despite these risks, accident statistics are not categorized by occupation, limiting delivery platforms' ability to monitor rider safety. Existing solutions are limited—only Zomato offers automatic crash detection, while other platforms mainly rely on manual SOS features. Smartphone crash detection systems from Apple and Google are designed for cars rather than motorcycles, and commercial motorcycle solutions use proprietary methods.
Related Work
The study builds upon two public datasets:
Powered Two-Wheelers Fall Dataset containing controlled motorcycle fall scenarios.
Driver Behavior Detection Using Smartphone Dataset containing normal and risky car-driving data, used as non-crash examples to reduce false alarms.
Unlike proprietary systems, the proposed approach is fully transparent and based on classical machine learning.
Dataset
The combined dataset consists of:
21 independent trials
1,788 feature windows
Four classes: fall/crash, normal riding, hard braking, and pothole.
Data preprocessing included:
Removing duplicate and corrupted sensor data.
Downsampling sensor readings to 50 Hz.
Extracting 2-second overlapping windows for analysis.
The dataset has limitations, particularly because hard braking and pothole classes each contain only one trial, and phone-drop scenarios are absent.
Methodology
For every 2-second window, 11 features were extracted from accelerometer and gyroscope data, including:
Acceleration statistics
Signal Magnitude Area (SMA)
Jerk
Gyroscope magnitude
Orientation change
Post-impact stillness
The system is designed to run entirely on-device using ONNX Runtime Web, enabling crash detection without internet access. Emergency notifications are sent only after detection if network connectivity is available.
Two machine learning models were evaluated:
Random Forest
XGBoost
Evaluation used 5-fold Group K-Fold cross-validation to prevent data leakage between overlapping sensor windows.
Experimental Results
The proposed system achieved:
Mean accuracy:65.7%
Fall/crash recall:92.3%
False positive rate:14.8%
Although overall accuracy varied significantly due to the small dataset, the system consistently detected actual crashes with high recall. Random Forest performed similarly to XGBoost while providing better interpretability, making it the preferred model.
Feature Importance
The most influential features were:
Gyroscope magnitude (mean and maximum)
Signal Magnitude Area (SMA)
Acceleration statistics
The post-stillness indicator, expected to help distinguish crashes from shocks
Conclusion
This work demonstrates that a classical machine learning pipeline, built entirely from public datasets and engineered inertial features, can achieve strong recall (92.3%) on two-wheeler crash detection despite a small and imbalanced training corpus (21 trials). The primary limitation — high accuracy variance from trial scarcity in two classes — is precisely diagnosed and directly addressable. Future work includes: (i) collecting self-recorded, phone-mounted trial data across all four target classes plus a phone-drop class currently absent from public sources; (ii) deploying a human-in-the-loop retraining pipeline in which confirmed field outcomes (true fall, false alarm, cancelled) are fed back into periodic model retraining; (iii) hyperparameter optimization once trial-level diversity is improved; and (iv) on-device deployment validation via ONNX Runtime Web under realistic connectivity conditions.
References
[1] A. Boubezoul, F. Dufour, S. Bouaziz, B. Larnaudie, and S. Espié, “Dataset on powered two wheelers fall and critical events detection,” Data in Brief, vol. 24, 103828, 2019, doi: 10.1016/j.dib.2019.103828.
[2] P. Wawage, “Driver Behavior Detection Using Smartphone,” Mendeley Data, V2, 2022, doi: 10.17632/9vr83n7z5j.2.
[3] Zomato, “Zomato Launches Accelerated Safety Response Program for Delivery Partners,” PR Newswire, Dec. 18, 2024.
[4] “Swiggy rolls out SOS button for delivery partners,” Business Today, Jul. 29, 2021.
[5] Apple Inc., “Use Crash Detection on iPhone or Apple Watch to call for help in an accident,” Apple Support.
[6] Sentiance, “Breaking New Ground: Sentiance Introduces First Mobile Crash Detection for Motorcycles,” PR Newswire, May 2, 2024.
[7] “One Crash, Years of Crisis: The Hidden Scale of Serious Road Injuries in India,” The Wire, Mar. 2026.
[8] Crashfree India. [Online]. Available: https://crashfreeindia.org/
[9] F. Pedregosa et al., “Scikit-learn: Machine Learning in Python,” Journal of Machine Learning Research, vol. 12, pp. 2825–2830, 2011.
[10] T. Chen and C. Guestrin, “XGBoost: A Scalable Tree Boosting System,” in Proc. 22nd ACM SIGKDD Int. Conf. Knowledge Discovery and Data Mining, 2016, pp. 785–794.
[11] ONNX Runtime. [Online]. Available: https://onnxruntime.ai/